<template>
	<view>
		<navigator url="" v-for="item in navList.slice(0, 7)" :key="item.id">{{ item.name }}</navigator>
		<navigator url="">全部分类</navigator>
	</view>
</template>

<script>
	export default {
		props: {
			navList: {
				type: Array,
				default: () => {
					return [{
						id: 1,
						name: 'Java'
					}, {
						id: 2,
						name: '前端'
					}, {
						id: 3,
						name: '云计算'
					}, {
						id: 4,
						name: '运维'
					}, {
						id: 5,
						name: '测试'
					}, {
						id: 6,
						name: 'UI设计'
					}, {
						id: 7,
						name: '人工智能'
					}, {
						id: 8,
						name: 'Node'
					}]
				}
			}
		},
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
view{
	display: flex;
	flex-wrap: wrap;
	padding: 20rpx;
	justify-content: space-between;
	navigator{
		width: 160rpx;
		height: 60rpx;
		background-color: #f5f9fc;
		border-radius: 10rpx;
		text-align: center;
		line-height: 60rpx;
		font-size: 26rpx;
		margin-top: 10rpx;
	}
}
</style>
